{layout name="common/layout" /}
<div class="main-password">
  <div class="main-title"><h2>修改密码</h2></div>
  {include file='common/alert' /}
  <form id="pwd_form" method="post">
    <div class="form-group main-form">
      <ul>
        <li>
          <label>输入新密码</label>
          <input id="password1" type="password" maxlength="200" style="width:265px;" class="form-control" name="password" required />
        </li>
        <li>
          <label>确认密码</label>
          <input id="password2" type="password" maxlength="200" style="width:265px;" class="form-control" required />
        </li>
        <li><input type="submit" class="btn btn-primary" value="确认修改" />{:token()}</li>
      </ul>
    </div>
  </form>
</div>
<script>
  $('#pwd_form').submit(function() {
    if ($('#password1').val() !== $('#password2').val()) {
      alert('两次输入的密码不一致！');
      return false;
    }
  })
</script>